<extend name="Public/layout"/>
<block name="head">
  <link rel="stylesheet" href="__PUBLIC__css/circle-platform.css?A=<php>echo time()</php>"> 
<script src="__PUBLIC__js/circle.js"></script>
<script src="__PUBLIC__js/yi-scroll.js"></script>
<style type="text/css">
.footer{
  display: none;
}
</style>
</block>
    
   <block name="main">
      <div class="circle-person">
        <div class="item-top">
            <div class="item-right">
              <img src="{$res.user.url_img}" onclick="location.href='/Home/person/center/id/{$res.user.id}'">
              <div class="user">
                <h4>{$res.user.nickname}</h4>
                <img src="__PUBLIC__images/ad-star.png">
                <!--<if condition="$grade.is_invest eq 1">
                  <p>已投</p>
                </if>-->
              </div>
              <!-- <div class="comment">
                 <ul>
                  <volist name="info.tag" id="v" offset="0" length='3'>
                    <li>
                      <span>{$v}</span>
                    </li>
                  </volist>
                  </ul>
              </div> -->
            </div>
           
                <switch name="grade.colligate" >
                <case value="1" break="1"><div class="btn-sug"></div></case>
                <case value="2"><div class="btn-set"></div> </case>
                <case value="3"><div class="btn-pru"></div> </case>
                <case value="4"><div class="btn-no"></div> </case>
                </switch> 
        </div>
        <div class="item-bottom">
         <div class="platform-one">
                    <div class="platform-title">
                      <p>平台实力</p>
                    </div>
                    <div class="platform-item">
                      <ul class="clearfix">
                        <li>
                          <p>实缴资金：{$info.funds}</p>
                        </li>
                        <li>
                          <p>平台背景：{$info.background}</p>
                        </li>
                        <li>
                          <p>运营时间：{$info.operation_data}</p>
                        </li>
                       
                      </ul>
                    </div>
                    <div class="platform-com">
                      <p>{$res.strength}
                      </p>
                    </div>
          </div>
          <div class="platform-two">
                    <div class="platform-title">
                      <p>合规进程</p>
                    </div>
                    <div class="platform-item">
                      <ul class="clearfix">
                        <li>
                          <p>银行存管：{$info.bank}</p>
                        </li>
                        <li>
                          <p>地方金融局备案：{$info.city_record}</p>
                        </li>
                        <li>
                          <p>互金专属ICP经营许可证：{$info.icp_permit}</p>
                        </li>
                       <!--   <li>
                          <p>ICP备案：{$info.icp_record}</p>
                        </li> -->
                        <li>
                          <p>设立信披专栏：{$info.disclosure_column}</p>
                        </li>
                        <li>
                          <p>第三方电子数据存证：{$info.data_storage}</p>
                        </li>
                        <li>
                          <p>违反限额规定：{$info.limit_regulation}</p>
                        </li>
                        <li>
                          <p>加入互金协会：{$info.association}</p>
                        </li>
                        <li>
                          <p>违规开展类资产证券化业务：{$info.asset_securities}</p>
                        </li>
                        <li>
                          <p>单一融资项目设置募集期：{$info.recruitment_period}</p>
                        </li>
                      </ul>
                    </div>
                    <div class="platform-com">
                      <p>{$res.strength}
                      </p>
                    </div>
          </div>
          <div class="platform-two">
                    <div class="platform-title">
                      <p>运营能力</p>
                    </div>
                    <div class="platform-item">
                      <ul class="clearfix">
                        <li>
                          <p>成交量：{$info.volume}</p>
                        </li>
                        <li>
                          <p>偿兑压力：{$info.repay_pressure}</p>
                        </li>
                        <li>
                          <p>逾期率：{$info.overdue_rate}</p>
                        </li>
                        <li>
                          <p>借款集中度：{$info.loan_focus}</p>
                        </li>
                        <li>
                          <p>投资集中度：{$info.investment_focus}</p>
                        </li>
                        <li>
                          <p>提现速度：{$info.cash_speed}</p>
                        </li>
                        <li>
                          <p>有无转让功能：{$info.attorn}</p>
                        </li>
                        <li>
                          <p>平均借款期限：{$info.average_term}</p>
                        </li>
                        <li>
                          <p>盈利能力：{$info.profitability}</p>
                        </li>
                      </ul>
                    </div>
                    <div class="platform-com">
                      <p>{$res.operate}
                      </p>
                    </div>
          </div>
          <div class="opinion-con clearfix">
              <div class="opinion-title">
                <h4>舆情解读</h4>
              </div>
              <div class="opinion">
                <ul class="opinion-comment clearfix">
                  <li>
                    <div class="same">
                      <p>一般负面：{$opinion_count}条</p>
                      <ul>
                      <foreach name="platform_opinion" item="v">
                        <li>
                          <p>负面舆情链接：<a href="{$v.url}">{$v.url}</a></p>
                          <p>负面舆情标题：{$v.opinion_title}</p>
                        </li>
                      </foreach>
                      </ul>
                    </div>
                  </li>
                  <li>
                    <div class="major">
                      <p>重大负面：{$info.major_attorn}</p>
                    </div>
                  </li>
                  <li>
                    <div class="serious">
                      <p>严重负面：{$info.serious_attorn}</p>
                    </div>
                  </li>
                </ul>
              </div>
              <div class="platform-com">
                      <p>{$res.public_opinion}
                      </p>
              </div>
          </div>
          <div class="manage-con clearfix">
           <div class="manage-title">
            <h4>管理团队</h4>
           </div>
            <div class="manage clearfix">
              <ul class="manage-comment">
                <foreach name="plat_team" item="v">
                <li class="clearfix">
                  <div class="manage-left">
                    <img src="{$v.pic}">
                  </div>
                  <div class="manage-right">
                    <h4>{$v.name}</h4>
                    <p>{$v.introduce}</p>
                  </div>
                </li>
                </foreach>
              </ul>
            </div>
            <div class="platform-com">
                      <p>{$res.team}
                      </p>
            </div>
          </div>
          <div class="guquan-con">
            <div class="guquan-title">
              <h4>股权结构</h4>
            </div>
            <div class="guquan">
              <ul class="guquan-comment">
              
              <foreach name="plat_stock" item="v">
                <li class="clearfix">
                  <div class="guquan-left">
                    <p>{$v.title}</p>
                  </div>
                  <div class="guquan-right">
                    <p>{$v.ratio}</p>
                  </div>
                </li>
              </foreach>

              </ul>
            </div>
            <div class="platform-com">
                      <p>{$res.stock}
                      </p>
              </div>
          </div>

           <div class="guquan-con">
            <div class="guquan-title">
              <h4>资产类型</h4>
            </div>
            <div class="guquan">
              <ul class="guquan-comment">
              
              <foreach name="platform_assets" item="v">
                <li class="clearfix">
                  <div class="guquan-left">
                    <p>{$v.object}</p>
                  </div>
                  <div class="guquan-right">
                    <p>{$v.assets}</p>
                  </div>
                </li>
              </foreach>

              </ul>
            </div>
            <div class="platform-com">
                      <p>{$res.assets}
                      </p>
              </div>
          </div>
          <notempty name="res.control">
            <div class="fengkong-con clearfix">
              <div class="fengkong-title">
                <h4>风控</h4>
              </div>
              <div class="platform-com">
                            <p>{$res.control}
                            </p>
                    </div>
            </div>
          </notempty>

          <notempty name="res.service">
            <div class="huodong clearfix">
              <div class="huodong-title">
                <h4>客服</h4>
              </div>
              <div class="platform-com">
                            <p>{$res.service}
                            </p>
                    </div>
            </div>
          </notempty>

          <notempty name="res.active">
            <div class="kefu-con clearfix">
              <div class="kefu-title">
                <h4>活动</h4>
              </div>
              <div class="platform-com">
                            <p>{$res.active}
                            </p>
                    </div>
            </div>
          </notempty>
        </div>
        <div class="item-time clearfix">
          <p>{$res.data}</p>
        </div>
        <div class="item-left clearfix">
           <if condition="$res.is_praise eq 0">
            <div class="item-no" onclick="praise(this,7,{$res.id})">
               <img src="__PUBLIC__images/comment-no.png" height="26" width="28">

          <else/>
            <div class="item-good"  onclick="praise(this,7,{$res.id})">
               <img src="__PUBLIC__images/comment-good.png" height="26" width="28">
          </if>

          
            <span>{$res.praise}</span>
          </div>
          
        </div>  
  </div>
<div class="circle-comment">
    <div class="comment-title">
      <h4>评论</h4>
      <p>{$info.comment}</p>
    </div>
    <div class="comment-item">
     <ul>
      
        <foreach name="comment" item="v">
          <li>
            <a href="javascript:" class="clearfix">
                <div class="item-top">
                    <div class="item-right">
                      <img src="{$v.user.url_img}">
                      <div class="user">
                        <h4>{$v.user.nickname}</h4>
                      </div>
                    </div>
               </div>
                <div class="item-bottom">
                  <p>{$v.content}</p>
                </div>
                <div class="item-time clearfix">
                  <p>{$v.add_date}</p>
                </div>
                <div class="item-left clearfix">
                  <if condition="$v.is_praise eq 0">
                    <div class="item-no" onclick="comment_praise(this,{$v.id})">
                      <img src="__PUBLIC__images/comment-no.png" height="26" width="28">
                  <else/>
                    <div class="item-good" onclick="comment_praise(this,{$v.id})">
                      <img src="__PUBLIC__images/comment-good.png" height="26" width="28">
                  </if>
                    
                    <span>{$v.praise_count}</span>
                  </div>
                 <div class="item-com"  onclick="comment_tab({$_GET['id']},{$v.id},{$v.id})" >
                    <img src="__PUBLIC__images/comment.png" height="25" width="28">
                    <span>回复</span>
                  </div>

                </div>
             </a>
        
              <ul>
                <foreach name="v.kid" item="va">
                <li>
                  <a href="#" class="clearfix">
                        <div class="item-top">
                            <div class="item-right">
                               <img src="{$va.user.url_img}">
                              <div class="user">
                                 <h4>{$va.user.nickname}</h4>
                              </div>
                            </div>
                       </div>
                        <div class="item-bottom">
                          <p>@{$v.user.nickname}：{$va.content}</p>
                        </div>
                        <div class="item-time">
                          <p>{$va.add_date}</p>
                        </div>
                     </a>
                </li>
                </foreach>
              </ul>
          </li>
          </foreach>
      </ul>

   <!--  <div class="loading">
        <span class="loading-left"></span>
        <p>加载中</p>
        <span class="loading-right"></span>
      </div>
      <div class="base-line">
        <span class="base-left"></span>
        <p>我是有底线的</p>
        <span class="base-right"></span>
      </div> -->
  </div>
  </div>
  <!-- 我要说两句 -->
  <div class="bottom-item">
  <p class="comment-inp" onclick="comment_tab({$_GET['id']},0,0)">我要说两句</p>
  </div>
  <!-- 评论输入框 -->
<div class="comment-info">
    <div class="comment-title">
          <h4>发表评论</h4>
          <img class="comment-hidden" src="__PUBLIC__images/bottom.png">
    </div>
    <div class="content">
      <textarea class="comment-textarea" cols="5" type="text" maxlength="200" placeholder="您已实名认证，请根据您的情况作出实际评价，不造谣，不夸大。一旦发现评论出现恶意造谣等虚假信息，将对评论本人进行曝光，封号处理，如有违法，将提交公安机关处理。" autofocus="true"></textarea>
      <p class="comment-send">发送</p>
    </div>
</div>
</block>
    <block name="js">
    <script type="text/javascript">
  function comment_praise(obj,id){
    $.post('{:U("Praise/ajax_praise")}',{
                id:id,
                video_id:id,
                type:3,
            },function(res){
              console.log(res)
               if(res.err==0){
                  $(obj).removeClass('item-no')
                  $(obj).addClass('item-good')
                  $(obj).find('img').attr('src','/App/Home/Public/images/comment-good.png')
                  var num = $(obj).find('span').text()
                  var n =parseInt(num)+1
                  $(obj).find('span').text(n)

               }else if(res.err==2){
                    layer.open({
                      content: res.msg
                      ,skin: 'msg'
                      ,time: 1
                      ,end: function () {
                              location.href = "/Home/User/login?callback=/Home/circle/depth_info/id/{$_GET['id']}/platform_id/{$_GET['platform_id']}"
                            }
                      });
               }else{
                    layer.open({
                      content: res.msg
                      ,skin: 'msg'
                      ,time: 1
                      });
               }
    })
  }
  function praise(obj,type,id){
        var userid = "{$_SESSION['user']['id']}"
         if(!userid){
            layer.open({
                    content: '请先登录！'
                    , skin: 'msg'
                    , time: 1
                    , end: function () {
                        location.href = "/Home/User/login?callback=/Home/circle/commentary_info/id/{$_GET['id']}/platform_id/{$_GET['platform_id']}"
                    }
                });
        }
          $.post('/Home/Praise/ajax_praise',{
            depthid:id,
            id:id,
            type:type,
          },function(res){
            if(res.err==0){
              $(obj).removeClass('item-no')
              $(obj).addClass('item-good')
              $(obj).find('img').attr('src','/App/Home/Public/images/comment-good.png')
              var num=parseInt($(obj).find('span').text())
              num = num+1
              $(obj).find('span').text(num)
            }else{
              layer.open({
                    content: res.msg
                    , skin: 'msg'
                    , time: 1
                    
              });
            }
          })
        
  }

  function comment_tab(id,id_parent,pid){
    $('.comment-info').css('display','block');
    $('.comment-send').attr('onclick',"add_coments(this,1,"+id_parent+","+pid+")")
  }

      $('.comment-hidden').click(function(){
        $('.comment-info').css('display','none');
      });
     //发表评论
    function add_coments(obj,type,id_parent,pid){
      var userid = "{$_SESSION['user']['id']}"
         if(!userid){
            layer.open({
                    content: '请先登录！'
                    , skin: 'msg'
                    , time: 1
                    , end: function () {
                        location.href = "/Home/User/login?callback=/Home/circle/depth_info/id/{$_GET['id']}/platform_id/{$_GET['platform_id']}"
                    }
                });
            return;
        }

      if(!id_parent){
          var id_parent=0;
      }
      var id_target = "{$_GET['id']}";

      var content = $(obj).prev('Textarea').val();
      if(!content){
          layer.open({
            content:'请输入评论内容！'
            ,skin: 'msg'
            ,time: 1
          });
                   return;
      }
    $.post('{:U("comment/add_coments")}',{
        content:content,
        id_parent:id_parent,
        type:5,
        id_target:id_target,
        p_id:pid,
        target_title:'{$info.title}',
    },function(res){
        if(res.err==0){
            $(obj).prev().val('');
            //ajax 无刷新添加评论
            if(type==1){
                 layer.open({
                content: res.msg
                ,skin: 'msg'
                ,time: 1
                ,end:function(){location.reload()}
                });
            }else{
                layer.open({
                    content: res.msg
                    ,skin: 'msg'
                    ,time: 1
                    ,end:function(){$(obj).parent().parent('.comment-info').css('display','none');}
                });
            }

            if(type==2){
            }
           
        }else{
            layer.msg(res.msg)
        }
        
    })
}


    var  colligate='{$grade.colligate}'
    var c_tag =''
    if(colligate==1){
    var c_tag = '放心投';
    }else if(colligate==2){
    var c_tag = '可以投';
    }else if(colligate==3){
    var c_tag = '谨慎投';
    }else if(colligate==4){
    var c_tag = '不要投';
    }
    var title=c_tag+"-{$platform_name}深度评测！"
    var desc = '{$res.user.nickname}--评论详情'
    var link=window.location.href
    var imgUrl='http://www.8hjie.com/App/Home/Public/images/wx_fx.jpg'
    
    </script>
    </body>
</block>